Matching MyType to subtyping

نویسندگان

  • Chieri Saito
  • Atsushi Igarashi
چکیده

The notion of MyType has been proposed to promote type-safe reuse of binary methods and recently extended to mutually recursive definitions. It is well known, however, that MyType does not match with subtyping well. In the current type systems, type safety is guaranteed at the expenses of subtyping, hence dynamic dispatch. In this article, we propose two mechanisms, namely, nonheritable methods and exact statements to remedy the mismatch between MyType and subtyping. We rigorously prove their safety by modeling them in a small calculus.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Subtyping for Extensible, Incomplete Objects

We extend the type system for the Lambda Calculus of Objects 16] with a mechanism of width subtyping and a treatment of incomplete objects. The main novelties over previous work are the use of subtype-bounded quantiication to capture a new and more direct rendering of MyType polymorphism, and a uniform treatment for other features that were accounted for via diierent systems in subsequent exten...

متن کامل

Type Inference for the Mixture of Matching and Implicit Subtyping

We present a type inference system for a language with object-oriented features such as polymorphic record access and subtyping. We separate the notion of matching and subtyping in order to avoid di culties caused by recursive type constraints. We will use two kinds of type constraints | record (variant) constraints and subtyping constraints. Then, we discuss simpli cation of such mixed type co...

متن کامل

Subtyping Constrained Types ( Draft ) Valery Trifonov

Constrained type systems are a natural generalization of Hindley/Milner type inference to languages with subtyping. This paper develops several subtyping relations on constrained types. We establish a full type abstraction property that equates an operational notion of subtyping with a semantic notion based on regular trees. The decidability of this notion of subtyping is open; we present a dec...

متن کامل

Subtyping Constrained Types

A constrained type is a type that comes with a set of subtyping constraints on variables occurring in the type. Constrained type inference systems are a natural generalization of Hindley/Milner type inference to languages with subtyping. This paper develops several subtyping relations on polymorphic constrained types of a general form that allows recursive constraints and multiple bounds on typ...

متن کامل

Subtyping and Matching for Mobile Objects

In [BCC00], we presented a general framework for extending calculi of mobile agents with object-oriented features, and we studied a typed instance of that model based on Cardelli and Gordon’s Mobile Ambients. Here, we refine our earlier work and define a new calculus which is based on Remote Procedure Call as the underlying protocol for method invocation, and on a different typing technique for...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Sci. Comput. Program.

دوره 78  شماره 

صفحات  -

تاریخ انتشار 2013